package com.gopay.common.domain.acps;

import com.gopay.common.domain.BaseEntity;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 异步入账流水表
 * @author XuHui
 * @version 1.0
 * on 2017/11/13.
 */
@Entity
@Table(name="ACPS_ASYNC_ACCT_DTL")
public class AcpsAsyncAcctDtl extends BaseEntity {
    /** 主键（uuid） */
    @Id
    @Column(name = "ID", unique = true, nullable = false)
    @GenericGenerator(name = "idGenerator", strategy = "uuid")
    @GeneratedValue(generator = "idGenerator")
    private String id;
    /** 国付宝订单号 */
    @Column(name="GOPAY_ORDER_ID")
    private String gopayOrderId;
    /** 订单号_记账点 */
    @Column(name="PACKAGE_ID")
    private String packageId;
    /** 账户id */
    @Column(name="ACCT_ID")
    private String acctId;
    /** 交易金额 */
    @Column(name="TRAN_AMT")
    private BigDecimal tranAmt;
    /** 状态 */
    @Column(name="STATE")
    private String state;
    /** 子分录快照 */
    @Column(name="SNAPSHOT")
    private String snapshot;
    /** 创建时间 */
    @Column(name="CREATE_TS")
    private Date createTs;
    /** 最后更新时间 */
    @Column(name="LAST_UPD_TS")
    private Date lastUpdTs;
    /** 版本号 */
    @Version
    @Column(name="VERSION")
    private Integer version;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getGopayOrderId() {
        return gopayOrderId;
    }

    public void setGopayOrderId(String gopayOrderId) {
        this.gopayOrderId = gopayOrderId;
    }

    public String getPackageId() {
        return packageId;
    }

    public void setPackageId(String packageId) {
        this.packageId = packageId;
    }

    public String getAcctId() {
        return acctId;
    }

    public void setAcctId(String acctId) {
        this.acctId = acctId;
    }

    public BigDecimal getTranAmt() {
        return tranAmt;
    }

    public void setTranAmt(BigDecimal tranAmt) {
        this.tranAmt = tranAmt;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getSnapshot() {
        return snapshot;
    }

    public void setSnapshot(String snapshot) {
        this.snapshot = snapshot;
    }

    public Date getCreateTs() {
        return createTs;
    }

    public void setCreateTs(Date createTs) {
        this.createTs = createTs;
    }

    public Date getLastUpdTs() {
        return lastUpdTs;
    }

    public void setLastUpdTs(Date lastUpdTs) {
        this.lastUpdTs = lastUpdTs;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }
}
